﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.Mvc;

namespace LiteratureManage.Web.Controllers
{
    using MvcContrib.FluentController;

    public partial class BaseController : AbstractFluentController
    {
        public virtual ActionResult Success(string message)
        {
            return Success(message, null);
        }

        public virtual ActionResult Success(string message, object data)
        {
            var model = new { state = 100, message = message, data = data };
            return Json(model);
        }

        public virtual ActionResult Failture(string message)
        {
            return Failture(message, null);
        }

        public virtual ActionResult Failture(string message, object data)
        {
            var model = new { state =1, message = message, data = data };
            return Json(model);
        }
    }
}
